import java.time.LocalDateTime;

public class Data_Time {
    public static void main(String[] args) {
        //显示当前日期和时间
        LocalDateTime currentDataTime = LocalDateTime.now();
        System.out.println(currentDataTime);
        //显示制定法日期和时间：年月日时分秒
        LocalDateTime dt = LocalDateTime.of(2004,5,29,11,20);
        System.out.println(dt);

        System.out.println("Year:"+dt.getYear());
        System.out.println("Month:"+dt.getDayOfMonth());
        System.out.println("Second:"+dt.getSecond());
        System.out.println("Chronology:"+dt.getChronology());
        System.out.println("Nano:"+dt.getNano());

        System.out.println(dt.plusYears(1));
    }
}
